
const BASE_URL = 'http://120.27.238.159:9090/uniApp/articleApi';

export function request(config={}){	
	let {
		url,
		data={},
		method="GET",
		header={}
	} = config
	
	url = BASE_URL+url
	//header['access-key'] = "luozihao.111"
	
	
	return new Promise((resolve,reject)=>{		
		uni.request({
			url,
			data,
			method,
			header,
			success:res=>{
				resolve(res.data)			
			},
			fail:err=>{
				
				reject(err)
			}
		})
	})
}
